/* Public opportunities page. Match the signed-in homepage cards. */
#VacanciesRowWrapper.vacancies-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 20px;
    margin: 24px 0;
}

#VacanciesRowWrapper > .vacancyDetailsCardWrapper.col-md-3 {
    flex: 0 0 calc((100% - 40px) / 3);
    width: calc((100% - 40px) / 3);
    min-width: 0;
    padding: 0;
    margin-bottom: 0 !important; /* Replace Bootstrap's mb-4 with the row gap. */
}

#VacanciesRowWrapper .vacancy-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    border: 1px solid var(--portal-border, #dbe5f1);
    border-radius: 12px;
    background: #fff;
    color: var(--portal-ink, #142c46);
    box-shadow: 0 2px 4px rgba(20, 44, 70, .03);
    overflow: hidden;
    font-size: var(--portal-text-md, .925rem);
    line-height: 1.55;
}

#VacanciesRowWrapper .vacancy-panel > .vacancy-panel-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 24px 24px 18px;
}

#VacanciesRowWrapper .vacancy-panel-main-content-row,
#VacanciesRowWrapper .vacancy-panel-image-content-row {
    margin-left: 0;
    margin-right: 0;
}

#VacanciesRowWrapper .vacancy-panel-main-content {
    min-width: 0;
    padding: 0;
}

#VacanciesRowWrapper .vacancy-panel-title {
    min-height: 0;
    margin: 0 0 16px;
    color: var(--portal-ink, #142c46);
    font-size: var(--portal-text-card-title, 1.125rem);
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    text-transform: none;
    overflow-wrap: anywhere;
}

#VacanciesRowWrapper .vacancy-panel-title a {
    color: inherit;
    font: inherit;
    text-underline-offset: 4px;
}

#VacanciesRowWrapper .vacancy-panel-main-content > div:not(.vacancy-panel-title) {
    margin-top: 8px;
    color: var(--portal-muted, #52657a);
    font-size: var(--portal-text-md, .925rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

#VacanciesRowWrapper .vacancy-panel-label {
    font-weight: 600;
}

#VacanciesRowWrapper .vacancy-panel-type {
    display: inline-block;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 5px;
    background: var(--portal-tag-surface, #edf3fc);
    color: var(--portal-link, #1c559b);
    font-size: var(--portal-text-tag, .8rem);
    line-height: 1.5;
    text-transform: none;
}

#VacanciesRowWrapper .vacancy-panel-salary {
    color: var(--portal-ink, #142c46);
    font-weight: 600;
    white-space: pre-line;
}

#VacanciesRowWrapper .vacancy-panel-closing-date {
    font-size: var(--portal-text-sm, .875rem);
}

#VacanciesRowWrapper .vacancy-panel-image-content-row:has(img) {
    margin-top: 20px;
}

#VacanciesRowWrapper .vacancy-panel-image-content-row:not(:has(img)) {
    display: none;
}

#VacanciesRowWrapper .vacancy-panel-image-content {
    width: 100%;
    padding: 0;
}

#VacanciesRowWrapper .vacancy-panel-image-content img {
    max-width: 100%;
    height: 56px;
    object-fit: contain;
    object-position: left center;
}

#VacanciesRowWrapper .vacancy-panel-footer {
    margin-top: auto;
    padding: 0 24px 24px;
    border: 0;
    background: transparent;
}

#VacanciesRowWrapper .vacancy-panel-footer .vacancy-panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    border: 1px solid var(--portal-primary, #1d5fb4);
    border-radius: 7px;
    background: var(--portal-primary, #1d5fb4);
    color: #fff;
    font-size: var(--portal-text-control, .95rem);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

#VacanciesRowWrapper .vacancy-panel-footer .vacancy-panel-link:hover {
    border-color: var(--portal-primary-hover, #174b8d);
    background: var(--portal-primary-hover, #174b8d);
    color: #fff;
}

#VacanciesRowWrapper .vacancy-panel-link:focus-visible:focus {
    color: var(--focus-text-color, #0b0c0c);
    background: var(--focus-color, #ffdd00);
    outline: 3px solid var(--focus-text-color, #0b0c0c);
    outline-offset: 3px;
    box-shadow: none;
}

/* Keep the form's black borders and yellow focus rules in Global/forms.css. */
[id$="_FiltersPanel"] {
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--portal-border, #dbe5f1);
    border-radius: 12px;
    background: var(--portal-surface, #f4f7fc);
}

#PageFilterLabel {
    margin-bottom: 16px;
    color: var(--portal-ink, #142c46);
    font-size: 1.25rem;
    line-height: 1.4;
}

#VacancyFilterTable {
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
}

#VacancyFilterTable th,
#VacancyFilterTable td {
    padding: 10px 12px;
    vertical-align: middle;
    border-color: var(--portal-border, #dbe5f1);
    background: transparent;
    color: var(--portal-ink, #142c46);
    font-size: var(--portal-text-base, 1rem);
    line-height: 1.5;
}

#VacancyFilterTable th {
    width: 200px;
    font-weight: 600;
}

#ResultCountWrapper {
    color: var(--portal-muted, #52657a);
    font-size: var(--portal-text-md, .925rem);
}

/* Retain the existing table-view pagination accessibility styles. */
#VacanciesTable_length { display: none; }
#VacanciesTable_previous > a,
#VacanciesTable_next > a { color: black; }

@media (max-width: 991.98px) {
    #VacanciesRowWrapper > .vacancyDetailsCardWrapper.col-md-3 {
        flex-basis: calc((100% - 20px) / 2);
        width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 767.98px) {
    [id$="_FiltersPanel"] { padding: 20px 16px; }
    #VacancyFilterTable th,
    #VacancyFilterTable td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 0;
    }
    #VacancyFilterTable th { padding-bottom: 0; }
}

@media (max-width: 575.98px) {
    #VacanciesRowWrapper > .vacancyDetailsCardWrapper.col-md-3 {
        flex-basis: 100%;
        width: 100%;
    }
    #VacanciesRowWrapper .vacancy-panel > .vacancy-panel-body { padding: 20px 20px 16px; }
    #VacanciesRowWrapper .vacancy-panel-footer { padding: 0 20px 20px; }
    #btnApplyFilters { width: 100%; }
}
